<template>
  <div>
    <div class="content">
      <div class="title">
        <span>选择新建简历或导入简历</span>
        <p>丰富的简历信息有助于提升求职率</p>
      </div>
      <div class="item" @click="templ">
        <div class="itemimg">
          <img src="../assets/imgs/gz/home3.png" alt="" />
        </div>
        <div class="itemtext">
          <span>新建简历</span>
          <p>海量行业模板、大牛简历助你求职顺利</p>
        </div>
      </div>
      <div class="item" @click="allin">
        <div class="itemimg">
          <img src="../assets/imgs/gz/home2.png" alt="" />
        </div>
        <div class="itemtext">
          <span>有简历，直接导入</span>
          <p>支持Word、PDF格式,80%以上内容识别率，自动专业排版</p>
        </div>
      </div>
      <div class="item" @click="speak">
        <div class="itemimg">
          <img src="../assets/imgs/gz/home1.png" alt="" />
        </div>
        <div class="itemtext">
          <span>拍照识别</span>
          <p>支持一页纸长度简历，拍照即可识别文本内容，自动智能排版</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "EstabLish",
  props: [""],
  methods: {
    speak() {
      let keys = window.localStorage.getItem("token");
      if (keys) {
        this.$toast("触发相机");
        this.$emit("runtu", false);
        return;
      } else {
        this.$emit("runtu", false);
        this.$router.push("/loginto");
        return;
      }
    },
    templ() {
      let keys = window.localStorage.getItem("token");
      if (keys) {
        this.$router.push("/template");
        this.$emit("runtu", false);
        return;
      } else {
        this.$emit("runtu", false);
        this.$router.push("/loginto");
        return;
      }
    },
    allin() {
      this.$emit("runtu", false);
      console.log(window.localStorage.getItem("token"));
      let keys = window.localStorage.getItem("token");
      if (keys) {
        this.$router.push("/allin");
        return;
      } else {
        this.$router.push("/loginto");
        return;
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.content {
  padding: 60px 20px;
  padding-bottom: 0px;
  // margin: auto;
  .title {
    text-align: center;
    height: 100px;
    font-size: 20px;
    p {
      font-size: 14px;
      color: #333;
    }
  }
  .item {
    display: flex;
    height: 125px;
    box-shadow: 0px 0px 10px 0px #ccc;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    .itemimg {
      height: 100%;
      img {
        height: 100%;
      }
    }
    .itemtext {
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      margin-left: 35px;
      margin-right: 20px;
      span {
        font-size: 18px;
        color: #333;
      }
      p {
        font-size: 12px;
        color: #ccc;
      }
    }
  }
}
</style>